KILL

Section: MINTLIB LIBRARY FUNCTIONS (3)
Updated: 3 March 1993
Index Return to Main Contents
 

NAME

kill - send a signal to a process or a group of processes  

SYNOPSIS

#include <unistd.h>

int kill(int pid, int sig);
 

DESCRIPTION

kill sends a signal to a process or a group of processes. The process of group of processes to which the signal is to be sent is specified by pid. The signal that is to be sent is specified by sig and is either on from the list given in signal, or 0. If sig is 0 (the null signal), error checking is performed but no signal is actually sent. This can be used to check the validity of pid. The real user ID of the sending process must match the real user ID of the receiving process, unless the effective user ID of the sending process is super-user. If pid is greater than zero, sig will be sent to the process whose process ID is equal to pid. If pid is 0, sig will be sent to all processes whose process group ID is equal to the process group ID of the sender. If pid is negative, sig will be sent to all processes whose process group ID is equal to the absolute value of pid.  

RETURN VALUES


 0 on success -1 on failure; errno is set to indicate the error  

SEE ALSO

getpid(3), getpgrp(3), setprgp(3), signal(3), Pkill(2)  

NOTES

Under UN*X, the real or effective user ID of the sending process must match the real or effective user ID of the receiving process, or the effective user ID of the sending process must be super-user. Under UN*X, the processes with a process ID of 0 and a process ID of 1 are treated specially.
 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
NOTES

This document was created by man2html, using the manual pages.
Time: 11:14:52 GMT, June 22, 2025